﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;

namespace System.Data.Entity
{
    public class DbContextResourceService<TContext, TResource> : DbContextGenericResourceService<TContext,TResource>
        where TContext : DbContext
        where TResource : class, new()
    {

        public DbContextResourceService(TContext context)
            : base(context)
        {
            this.All =  this.Context.Set<TResource>(); 
        }

        public virtual TResource Create()
        {
            return Create<TResource>();
        }
        
        protected virtual DbSet<TResource> All
        {
            get; private set; 
        }

        //public virtual TResource Create(object context)
        //{
        //    return Create<TResource>(context);
        //}
    }
}
